﻿using System;
using System.Collections.Generic;
using System.Text;
using Kugar.Core.Web;
using Microsoft.AspNetCore.Http;

namespace Kugar.UI.Web.AdminLTE.Helpers
{
    public static class RequestExtMethod
    {
        /// <summary>
        /// 获取html中使用CityPicker控件产生的数据
        /// </summary>
        /// <param name="request"></param>
        /// <param name="preName"></param>
        /// <returns></returns>
        public static (string title, string proviceCode, string cityCode, string districtCode) GetCityPicker(
            this HttpRequest request, string preName)
        {
            return (request.GetString(preName), request.GetString(preName + "_ProvinceCode"),
                request.GetString(preName + "_CityCode"), request.GetString(preName + "_DistrictCode"));
        }
    }
}
